﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Text;
using System.Threading.Tasks;

namespace Devdream.DAL
{
    /// <summary>
    /// 上下文简单工厂
    /// </summary>
   public  class ContextFactory
    {
       public static DevdreamDbContent GetCurrentContext()
       {
           DevdreamDbContent dContext = CallContext.GetData("DevdreamDbContent") as DevdreamDbContent;
           if(dContext==null)
           {
             dContext=new DevdreamDbContent();
             CallContext.SetData("DevdreamDbContent", dContext);
           }
           return dContext;
       }
    }
}
